<?php

	/**
	 * Verifies bootstrapper execution to ensure file
	 * necessities, and disabling direct access
	 */
	defined('ENGINE') or exit;
	
	/**
	 * Autoload handler
	 */
	function engine_autoload_handler($class, $prefix = 'class_', $directory = 'classes')
	{
		$class = strtolower((string) $class);

		if(empty($class) || class_exists($class))
		{
			return;
		}

		require(ENGINE_DIR . DIRECTORY_SEPARATOR . ($directory ? $directory . DIRECTORY_SEPARATOR : '') . $prefix . $class . '.php');
	}

?>